<?xml version="1.0"?>
<xs:schema targetNamespace="http://schemas.icitadel.com/Lazarus/Source-Old.xsd" elementFormDefault="qualified" xmlns="http://schemas.icitadel.com/Lazarus/Source-Old.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vs="http://schemas.microsoft.com/Visual-Studio-Intellisense" vs:friendlyname="FAI Reuse Controls" vs:ishtmlschema="false" vs:iscasesensitive="false" vs:requireattributequotes="false">
    <xs:simpleType name="IndexTypes">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Foreign" />
            <xs:enumeration value="Unique" />
            <xs:enumeration value="Primary" />
            <xs:enumeration value="Clustered" />
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="ConstraintModifiers">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Default" />
            <xs:enumeration value="Not" />
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="ConstraintOperations">
        <xs:restriction base="xs:string">
            <xs:enumeration value="GreaterThan" />
            <xs:enumeration value="GreaterThanOrEqual" />
            <xs:enumeration value="LessThan" />
            <xs:enumeration value="LessThanOrEqual" />
            <xs:enumeration value="ExclusiveBetween" />
            <xs:enumeration value="InclusiveBetween" />
            <xs:enumeration value="Equal" />
            <xs:enumeration value="In" />
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="MethodTypes">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Create" />
            <xs:enumeration value="Update" />
            <xs:enumeration value="Get" />
            <xs:enumeration value="List" />
            <xs:enumeration value="Custom" />
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="ImplementDBMethods">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Category" />
            <xs:enumeration value="Aggregate" />
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="ParameterDirections">
        <xs:restriction base="xs:string">
            <xs:enumeration value="in" />
            <xs:enumeration value="out" />
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="FieldTypes">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Char" />
            <xs:enumeration value="Varchar" />
            <xs:enumeration value="Uniqueidentifier" />
            <xs:enumeration value="Bit" />
            <xs:enumeration value="Int" />
            <xs:enumeration value="TinyInt" />
            <xs:enumeration value="Text" />
            <xs:enumeration value="DateTime" />
            <xs:enumeration value="Identity" />
            <xs:enumeration value="Decimal" />
            <xs:enumeration value="Money" />
            <xs:enumeration value="Float" />
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="UserTypes">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Internal" />
            <xs:enumeration value="Windows" />
        </xs:restriction>
    </xs:simpleType>
    <xs:simpleType name="Description">
        <xs:restriction base="xs:string" />
    </xs:simpleType>
    <xs:complexType name="IndexCollection">
        <xs:sequence>
            <xs:element name="index" type="Index" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="FieldConstraints">
        <xs:sequence>
            <xs:element name="constraint" type="FieldConstraint" minOccurs="1" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="FieldConstraint">
        <xs:sequence>
            <xs:element name="constraint-values" type="ConstraintValues" minOccurs="0" maxOccurs="1" />
        </xs:sequence>
        <xs:attribute name="name" type="xs:string" />
        <xs:attribute name="operation" type="ConstraintOperations" />
        <xs:attribute name="modifier" type="ConstraintModifiers" />
        <xs:attribute name="value" type="xs:string" />
        <xs:attribute name="min-value" type="xs:string" />
        <xs:attribute name="max-value" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="ConstraintValues">
        <xs:sequence>
            <xs:element name="constraint-value" type="ConstraintValue" minOccurs="1" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="ConstraintValue">
        <xs:attribute name="value" type="xs:value" />
    </xs:complexType>
    <xs:complexType name="Index">
        <xs:choice minOccurs="0" maxOccurs="1">
            <xs:element name="description" type="Description" />
            <xs:element name="cascade-delete" type="xs:boolean" />
        </xs:choice>
        <xs:attribute name="type" type="IndexTypes" use="required" />
        <xs:attribute name="object" type="xs:string" />
        <xs:attribute name="accessor" type="xs:string" />
        <xs:attribute name="role" type="xs:string" />
        <xs:attribute name="alias" type="xs:string" />
        <xs:attribute name="filegroup" type="xs:string" />
        <xs:attribute name="name" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="Security">
        <xs:all>
            <xs:element name="roles" type="RoleCollection" minOccurs="0" maxOccurs="1" />
            <xs:element name="users" type="UserCollection" minOccurs="0" maxOccurs="1" />
        </xs:all>
    </xs:complexType>
    <xs:complexType name="RoleCollection">
        <xs:sequence>
            <xs:element name="role" type="Role" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Role">
        <xs:attribute name="name" type="xs:string" use="required" />
    </xs:complexType>
    <xs:complexType name="MethodParameterCollection">
        <xs:sequence>
            <xs:element name="method-param" type="MethodParameter" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="MethodParameter">
        <xs:attribute name="name" type="xs:string" use="required" />
        <xs:attribute name="type" type="FieldTypes" use="required" />
        <xs:attribute name="size" type="xs:integer" />
        <xs:attribute name="scale" type="xs:integer" />
        <xs:attribute name="direction" type="ParameterDirections" default="in" />
    </xs:complexType>
    <xs:complexType name="UserCollection">
        <xs:sequence>
            <xs:element name="user" type="User" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="User">
        <xs:all>
            <xs:element name="roles" type="RoleCollection" minOccurs="0" maxOccurs="1" />
        </xs:all>
        <xs:attribute name="name" type="xs:string" use="required" />
        <xs:attribute name="user-type" type="UserTypes" use="required" />
        <xs:attribute name="password" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="Permission">
        <xs:all>
            <xs:element name="capabilities" type="CapabilityCollection" minOccurs="1" maxOccurs="1" />
        </xs:all>
        <xs:attribute name="role" type="xs:string" use="required" />
    </xs:complexType>
    <xs:complexType name="PermissionCollection">
        <xs:sequence>
            <xs:element name="permission" type="Permission" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Capability">
        <xs:attribute name="name" type="xs:string" use="required" />
    </xs:complexType>
    <xs:complexType name="CapabilityCollection">
        <xs:sequence>
            <xs:element name="capability" type="Capability" minOccurs="0" maxOccurs="unbounded" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Field">
        <xs:all>
            <xs:element name="description" type="Description" minOccurs="0" maxOccurs="1" />
            <xs:element name="indexes" type="IndexCollection" minOccurs="0" maxOccurs="1" />
            <xs:element name="constraints" type="FieldConstraints" minOccurs="0" maxOccurs="1" />
        </xs:all>
        <xs:attribute name="name" type="xs:string" use="required" />
        <xs:attribute name="alias" type="xs:string" />
        <xs:attribute name="size" type="xs:integer" />
        <xs:attribute name="scale" type="xs:integer" />
        <xs:attribute name="type" type="FieldTypes" />
        <xs:attribute name="autogenerate" type="xs:boolean" default="false" />
        <xs:attribute name="required" type="xs:boolean" default="false" />
        <xs:attribute name="readonly" type="xs:boolean" default="false" />
        <xs:attribute name="tableonly" type="xs:boolean" default="false" />
        <xs:attribute name="friendly-name" type="xs:string" />
        <xs:attribute name="logical-name" type="xs:string" />
        <xs:attribute name="default" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="FieldCollection">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="field" type="Field" />
        </xs:choice>
    </xs:complexType>
    <xs:complexType name="Method">
        <xs:all minOccurs="0" maxOccurs="1">
            <xs:element name="description" type="Description" minOccurs="0" maxOccurs="1" />
            <xs:element name="permissions" type="PermissionCollection" minOccurs="0" maxOccurs="1" />
            <xs:element name="method-params" type="MethodParameterCollection" minOccurs="0" maxOccurs="1" />
        </xs:all>
        <xs:attribute name="name" type="xs:string" />
        <xs:attribute name="type" type="MethodTypes" use="required" />
        <xs:attribute name="filter" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="MethodCollection">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="method" type="Method" />
        </xs:choice>
    </xs:complexType>
    <xs:complexType name="Implement">
        <xs:attribute name="ref" type="xs:string" use="required" />
        <xs:attribute name="db-method" type="ImplementDBMethods" default="Category" />
    </xs:complexType>
    <xs:complexType name="ImplementCollection">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="implement" type="Implement" />
        </xs:choice>
    </xs:complexType>
    <xs:complexType name="Entity">
        <xs:all minOccurs="0" maxOccurs="1">
            <xs:element name="description" type="Description" minOccurs="0" maxOccurs="1" />
            <xs:element name="implements" type="ImplementCollection" minOccurs="0" maxOccurs="1" />
            <xs:element name="fields" type="FieldCollection" minOccurs="0" maxOccurs="1" />
            <xs:element name="methods" type="MethodCollection" minOccurs="0" maxOccurs="1" />
            <xs:element name="permissions" type="PermissionCollection" minOccurs="0" maxOccurs="1" />
            <xs:element name="collections" type="CollectionCollection" minOccurs="0" maxOccurs="1" />
        </xs:all>
        <xs:attribute name="name" type="xs:string" use="required" />
        <xs:attribute name="alias" type="xs:string" />
        <xs:attribute name="friendly-name" type="xs:string" />
        <xs:attribute name="logical-name" type="xs:string" />
        <xs:attribute name="filegroup" type="xs:string" />
        <xs:attribute name="title-field" type="xs:string" />
        <xs:attribute name="type-table" type="xs:string" />
        <xs:attribute name="type-field" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="Collection">
        <xs:attribute name="name" type="xs:string" use="required" />
        <xs:attribute name="object" type="xs:string" use="required" />
        <xs:attribute name="binding-field" type="xs:string" />
        <xs:attribute name="binding-object" type="xs:string" />
        <xs:attribute name="alias" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="CollectionCollection">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="collection" type="Collection" />
        </xs:choice>
    </xs:complexType>
    <xs:complexType name="Reference">
        <xs:all>
            <xs:element name="description" type="Description" minOccurs="0" maxOccurs="1" />
            <xs:element name="indexes" type="IndexCollection" minOccurs="0" maxOccurs="1" />
        </xs:all>
        <xs:attribute name="name" type="xs:string" />
        <xs:attribute name="alias" type="xs:string" />
        <xs:attribute name="required" type="xs:boolean" default="false" />
        <xs:attribute name="object" type="xs:string" use="required" />
        <xs:attribute name="accessor" type="xs:string" />
        <xs:attribute name="cardinality" type="xs:string" use="optional" />
    </xs:complexType>
    <xs:complexType name="ReferenceCollection">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="reference" type="Reference" />
        </xs:choice>
    </xs:complexType>
    <xs:complexType name="Intersection">
        <xs:all minOccurs="0" maxOccurs="1">
            <xs:element name="description" type="Description" minOccurs="0" maxOccurs="1" />
            <xs:element name="references" type="ReferenceCollection" minOccurs="0" maxOccurs="1" />
            <xs:element name="implements" type="ImplementCollection" minOccurs="0" maxOccurs="1" />
            <xs:element name="fields" type="FieldCollection" minOccurs="0" maxOccurs="1" />
            <xs:element name="methods" type="MethodCollection" minOccurs="0" maxOccurs="1" />
        </xs:all>
        <xs:attribute name="name" type="xs:string" use="required" />
        <xs:attribute name="alias" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="IntersectionCollection">
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="intersection" type="Intersection" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="EntityCollection">
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="object" type="Entity" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="DefaultValues">
        <xs:all minOccurs="0" maxOccurs="1">
            <xs:element name="fields" type="FieldCollection" minOccurs="0" maxOccurs="1" />
        </xs:all>
    </xs:complexType>
    <xs:complexType name="DataSource">
        <xs:attribute name="location" type="xs:string" use="required" />
        <xs:attribute name="schema" type="xs:string" use="required" />
        <xs:attribute name="user" type="xs:string" />
        <xs:attribute name="password" type="xs:string" />
        <xs:attribute name="name" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="Project">
        <xs:all minOccurs="0" maxOccurs="1">
            <xs:element name="description" type="Description" />
            <xs:element name="security" type="Security" />
            <xs:element name="datasource" type="DataSource" />
            <xs:element name="defaults" type="DefaultValues" />
            <xs:element name="objects" type="EntityCollection" />
            <xs:element name="intersections" type="IntersectionCollection" />
            <xs:element name="businessviews" type="BusinessViews" />
        </xs:all>
        <xs:attribute name="name" type="xs:string" use="required" />
        <xs:attribute name="owner" type="xs:string" use="required" />
        <xs:attribute name="user" type="xs:string" />
        <xs:attribute name="namespace" type="xs:string" />
        <xs:attribute name="namespaceprefix" type="xs:string" />
        <xs:attribute name="namespaceuri" type="xs:string" />
        <xs:attribute name="businessconcept" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="DataColumn">
        <xs:attribute name="name" type="xs:string" />
        <xs:attribute name="ref" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="DataColumns">
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="column" type="DataColumn" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="DataTable">
        <xs:all minOccurs="0" maxOccurs="1">
            <xs:element name="columns" type="DataColumns" />
        </xs:all>
        <xs:attribute name="name" type="xs:string" />
        <xs:attribute name="ref" type="xs:string" />
        <xs:attribute name="inherit" type="xs:string" />
        <xs:attribute name="type" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="DataTables">
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="datatable" type="DataTable" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="RelationReference">
        <xs:attribute name="name" type="xs:string" />
        <xs:attribute name="ref" type="xs:string" />
        <xs:attribute name="cardinality" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="Relation">
        <xs:all minOccurs="1" maxOccurs="1">
            <xs:element name="source" type="RelationReference" />
            <xs:element name="target" type="RelationReference" />
        </xs:all>
        <xs:attribute name="name" type="xs:string" />
    </xs:complexType>
    <xs:complexType name="Relations">
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="relation" type="Relation" />
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="BusinessView">
        <xs:all minOccurs="0" maxOccurs="1">
            <xs:element name="datatables" type="DataTables" />
            <xs:element name="relations" type="Relations" />
        </xs:all>
        <xs:attribute name="name" type="xs:string" use="required" />
        <xs:attribute name="context" type="xs:string" use="required" />
    </xs:complexType>
    <xs:complexType name="BusinessViews">
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="businessview" type="BusinessView" />
        </xs:sequence>
    </xs:complexType>
    <xs:element name="project" type="Project" />
</xs:schema>